import { createRouter, createWebHistory } from 'vue-router'
import MainView from 'views/MainView.vue'
import { component } from 'v-viewer'

const routes = [
	{
		path: '/',
		name: 'main',
		component: MainView,
		redirect: '/home',
		children: [
			{
				path: '/home',
				name: 'home',
				meta: {
					title: "首页",
					isShow: true,
					icon: "House"
				},
				// route level code-splitting
				// this generates a separate chunk (about.[hash].js) for this route
				// which is lazy-loaded when the route is visited.
				component: () => import(/* webpackChunkName: "home" */ 'views/Home/HomeView.vue')
			},
			{
				path: '/user',
				name: 'user',
				meta: {
					title: "求职者管理",
					isShow: true,
					icon: "User"
				},
				// route level code-splitting
				// this generates a separate chunk (about.[hash].js) for this route
				// which is lazy-loaded when the route is visited.
				component: () => import(/* webpackChunkName: "user" */ 'views/User/UserView.vue')
			},
			{
				path: '/recruiter',
				name: 'Recruiter',
				meta: {
					title: "招聘者管理",
					isShow: true,
					icon: 'Service'
				},
				component: () => import(/* webpackChunkName: "user" */ 'views/Recruiter/Recruiter.vue')
			},
			{
				path: '/resume',
				name: 'resume',
				meta: {
					title: "简历管理",
					isShow: true,
					icon: 'Tickets'
				},
				component: () => import(/* webpackChunkName: "resume" */ 'views/Resume/ResumeView.vue')
			},
			{
				path: '/company',
				name: 'company',
				meta: {
					title: "分行管理",
					isShow: true,
					icon: 'Discount'
				},
				component: () => import(/* webpackChunkName: "company" */ 'views/Company/CompanyView.vue')
			},
			{
				path: '/BranchManagement',
				name: 'BranchManagement',
				meta: {
					title: "分行专区管理",
					isShow: true,
					icon: 'Discount'
				},
				component: () => import(/* webpackChunkName: "company" */ 'views/BranchManagement/index.vue')
			},
			{
				path: '/industry',
				name: 'industry',
				meta: {
					title: "行业管理",
					isShow: true,
					icon: 'Memo'
				},
				component: () => import(/* webpackChunkName: "industry" */ 'views/Industry/IndustryView.vue')
			},
			{
				path: '/position',
				name: 'position',
				meta: {
					title: "岗位管理",
					isShow: true,
					icon: 'MessageBox'
				},
				component: () => import(/* webpackChunkName: "company" */ 'views/Position/PositionView.vue')
			},
			{
				path: '/positionManagement',
				name: 'positionManagement',
				meta: {
					title: "职位管理",
					isShow: true,
					icon: 'Collection'
				},
				component: () => import(/* webpackChunkName: "company" */ 'views/positionManagement/index.vue')
			},
			{
				path: "/school",
				name: "school",
				meta: {
					title: "名校研学",
					isShow: true,
					icon: "DocumentChecked"
				},
				component: () => import(/* webpackChunkName: "school" */ 'views/School/SchoolView.vue')
			},

			{
				path: '/apply',
				name: 'apply',
				meta: {
					title: "应聘记录管理",
					isShow: true,
					icon: 'PieChart'
				},
				component: () => import(/* webpackChunkName: "company" */ 'views/Apply/ApplyView.vue')
			},

			{
				path: '/recordManagement',
				name: 'recordManagement',
				meta: {
					title: "浏览记录管理",
					isShow: true,
					icon: 'View'
				},
				component: () => import(/* webpackChunkName: "company" */ 'views/recordManagement/index.vue')
			},
			{
				path: '/banner',
				name: 'banner',
				meta: {
					title: "轮播图管理",
					isShow: true,
					icon: 'Picture'
				},
				component: () => import(/* webpackChunkName: "banner" */ 'views/Banner/BannerView.vue')
			},
			{
				path: '/service',
				name: 'service',
				meta: {
					title: "服务中心",
					isShow: true,
					icon: 'Phone'
				},
				component: () => import(/* webpackChunkName: "company" */ 'views/Service/ServiceView.vue')
			},
			{
				path: '/helpCenterManagement',
				name: 'helpCenterManagement',
				meta: {
					title: "帮助中心管理",
					isShow: true,
					icon: 'Help'
				},
				component: () => import(/* webpackChunkName: "company" */ 'views/helpCenterManagement/index.vue')
			},
			{
				path: '/cms',
				name: 'cms',
				meta: {
					title: "系统公告",
					isSetting: true,
				},
				component: () => import(/* webpackChunkName: "cms" */ 'views/Cms/CmsView.vue')
			},
			{
				path: '/about',
				name: 'about',
				meta: {
					title: "关于我们",
					isSetting: true,
				},
				component: () => import(/* webpackChunkName: "about" */ 'views/About/AboutView.vue')
			},
			{
				path: '/agreement',
				name: 'agreement',
				meta: {
					title: "用户协议",
					isSetting: true,
				},
				component: () => import(/* webpackChunkName: "agreement" */ 'views/Agreement/AgreementView.vue')
			},
			{
				path: '/policy',
				name: 'policy',
				meta: {
					title: "隐私政策",
					isSetting: true,
				},
				component: () => import(/* webpackChunkName: "policy" */ 'views/Policy/PolicyView.vue')
			}
		]
	},
	{
		path: '/login',
		name: 'login',
		// route level code-splitting
		// this generates a separate chunk (about.[hash].js) for this route
		// which is lazy-loaded when the route is visited.
		component: () => import(/* webpackChunkName: "login" */ '../views/Login/LoginView.vue')
	},
	{
		path: '/demo',
		name: 'demo',
		// route level code-splitting
		// this generates a separate chunk (about.[hash].js) for this route
		// which is lazy-loaded when the route is visited.
		component: () => import(/* webpackChunkName: "demo" */ '../views/Demo/DemoView.vue')
	}
]

const router = createRouter({
	history: createWebHistory(process.env.BASE_URL),
	routes
})

export default router
